3.1.79 \(\int \frac {(e x)^{-1+n}}{a+b \text {sech}(c+d x^n)} \, dx\) [79]

3.1.79.1 Optimal result
3.1.79.2 Mathematica [A] (verified)
3.1.79.3 Rubi [A] (verified)
3.1.79.4 Maple [C] (warning: unable to verify)
3.1.79.5 Fricas [B] (verification not implemented)
3.1.79.6 Sympy [F]
3.1.79.7 Maxima [F]
3.1.79.8 Giac [F]
3.1.79.9 Mupad [B] (verification not implemented)

3.1.79.1 Optimal result

Integrand size = 22, antiderivative size = 87 \[ \int \frac {(e x)^{-1+n}}{a+b \text {sech}\left (c+d x^n\right )} \, dx=\frac {(e x)^n}{a e n}-\frac {2 b x^{-n} (e x)^n \arctan \left (\frac {\sqrt {a-b} \tanh \left (\frac {1}{2} \left (c+d x^n\right )\right )}{\sqrt {a+b}}\right )}{a \sqrt {a-b} \sqrt {a+b} d e n} \]

output
(e*x)^n/a/e/n-2*b*(e*x)^n*arctan((a-b)^(1/2)*tanh(1/2*c+1/2*d*x^n)/(a+b)^( 
1/2))/a/d/e/n/(x^n)/(a-b)^(1/2)/(a+b)^(1/2)
 
3.1.79.2 Mathematica [A] (verified)

Time = 0.65 (sec) , antiderivative size = 80, normalized size of antiderivative = 0.92 \[ \int \frac {(e x)^{-1+n}}{a+b \text {sech}\left (c+d x^n\right )} \, dx=\frac {(e x)^n \left (d+c x^{-n}+\frac {2 b x^{-n} \arctan \left (\frac {(-a+b) \tanh \left (\frac {1}{2} \left (c+d x^n\right )\right )}{\sqrt {a^2-b^2}}\right )}{\sqrt {a^2-b^2}}\right )}{a d e n} \]

input
Integrate[(e*x)^(-1 + n)/(a + b*Sech[c + d*x^n]),x]
 
output
((e*x)^n*(d + c/x^n + (2*b*ArcTan[((-a + b)*Tanh[(c + d*x^n)/2])/Sqrt[a^2 
- b^2]])/(Sqrt[a^2 - b^2]*x^n)))/(a*d*e*n)
 
3.1.79.3 Rubi [A] (verified)

Time = 0.46 (sec) , antiderivative size = 80, normalized size of antiderivative = 0.92, number of steps used = 8, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.318, Rules used = {5963, 5959, 3042, 4270, 3042, 3138, 221}

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

\(\displaystyle \int \frac {(e x)^{n-1}}{a+b \text {sech}\left (c+d x^n\right )} \, dx\)

\(\Big \downarrow \) 5963

\(\displaystyle \frac {x^{-n} (e x)^n \int \frac {x^{n-1}}{a+b \text {sech}\left (d x^n+c\right )}dx}{e}\)

\(\Big \downarrow \) 5959

\(\displaystyle \frac {x^{-n} (e x)^n \int \frac {1}{a+b \text {sech}\left (d x^n+c\right )}dx^n}{e n}\)

\(\Big \downarrow \) 3042

\(\displaystyle \frac {x^{-n} (e x)^n \int \frac {1}{a+b \csc \left (i d x^n+i c+\frac {\pi }{2}\right )}dx^n}{e n}\)

\(\Big \downarrow \) 4270

\(\displaystyle \frac {x^{-n} (e x)^n \left (\frac {x^n}{a}-\frac {\int \frac {1}{\frac {a \cosh \left (d x^n+c\right )}{b}+1}dx^n}{a}\right )}{e n}\)

\(\Big \downarrow \) 3042

\(\displaystyle \frac {x^{-n} (e x)^n \left (\frac {x^n}{a}-\frac {\int \frac {1}{\frac {a \sin \left (i d x^n+i c+\frac {\pi }{2}\right )}{b}+1}dx^n}{a}\right )}{e n}\)

\(\Big \downarrow \) 3138

\(\displaystyle \frac {x^{-n} (e x)^n \left (\frac {x^n}{a}+\frac {2 i \int \frac {1}{\left (1-\frac {a}{b}\right ) x^{2 n}+\frac {a+b}{b}}d\left (i \tanh \left (\frac {1}{2} \left (d x^n+c\right )\right )\right )}{a d}\right )}{e n}\)

\(\Big \downarrow \) 221

\(\displaystyle \frac {x^{-n} (e x)^n \left (\frac {x^n}{a}-\frac {2 b \arctan \left (\frac {\sqrt {a-b} \tanh \left (\frac {1}{2} \left (c+d x^n\right )\right )}{\sqrt {a+b}}\right )}{a d \sqrt {a-b} \sqrt {a+b}}\right )}{e n}\)

input
Int[(e*x)^(-1 + n)/(a + b*Sech[c + d*x^n]),x]
 
output
((e*x)^n*(x^n/a - (2*b*ArcTan[(Sqrt[a - b]*Tanh[(c + d*x^n)/2])/Sqrt[a + b 
]])/(a*Sqrt[a - b]*Sqrt[a + b]*d)))/(e*n*x^n)
 

3.1.79.3.1 Defintions of rubi rules used

rule 221
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[-a/b, 2]/a)*ArcTanh[x 
/Rt[-a/b, 2]], x] /; FreeQ[{a, b}, x] && NegQ[a/b]
 

rule 3042
Int[u_, x_Symbol] :> Int[DeactivateTrig[u, x], x] /; FunctionOfTrigOfLinear 
Q[u, x]
 

rule 3138
Int[((a_) + (b_.)*sin[Pi/2 + (c_.) + (d_.)*(x_)])^(-1), x_Symbol] :> With[{ 
e = FreeFactors[Tan[(c + d*x)/2], x]}, Simp[2*(e/d)   Subst[Int[1/(a + b + 
(a - b)*e^2*x^2), x], x, Tan[(c + d*x)/2]/e], x]] /; FreeQ[{a, b, c, d}, x] 
 && NeQ[a^2 - b^2, 0]
 

rule 4270
Int[(csc[(c_.) + (d_.)*(x_)]*(b_.) + (a_))^(-1), x_Symbol] :> Simp[x/a, x] 
- Simp[1/a   Int[1/(1 + (a/b)*Sin[c + d*x]), x], x] /; FreeQ[{a, b, c, d}, 
x] && NeQ[a^2 - b^2, 0]
 

rule 5959
Int[(x_)^(m_.)*((a_.) + (b_.)*Sech[(c_.) + (d_.)*(x_)^(n_)])^(p_.), x_Symbo 
l] :> Simp[1/n   Subst[Int[x^(Simplify[(m + 1)/n] - 1)*(a + b*Sech[c + d*x] 
)^p, x], x, x^n], x] /; FreeQ[{a, b, c, d, m, n, p}, x] && IGtQ[Simplify[(m 
 + 1)/n], 0] && IntegerQ[p]
 

rule 5963
Int[((e_)*(x_))^(m_.)*((a_.) + (b_.)*Sech[(c_.) + (d_.)*(x_)^(n_)])^(p_.), 
x_Symbol] :> Simp[e^IntPart[m]*((e*x)^FracPart[m]/x^FracPart[m])   Int[x^m* 
(a + b*Sech[c + d*x^n])^p, x], x] /; FreeQ[{a, b, c, d, e, m, n, p}, x]
 
3.1.79.4 Maple [C] (warning: unable to verify)

Result contains higher order function than in optimal. Order 9 vs. order 3.

Time = 0.85 (sec) , antiderivative size = 317, normalized size of antiderivative = 3.64

method result size
risch \(\frac {x \,{\mathrm e}^{\frac {\left (-1+n \right ) \left (-i \operatorname {csgn}\left (i e \right ) \operatorname {csgn}\left (i x \right ) \operatorname {csgn}\left (i e x \right ) \pi +i \operatorname {csgn}\left (i e \right ) \operatorname {csgn}\left (i e x \right )^{2} \pi +i \operatorname {csgn}\left (i x \right ) \operatorname {csgn}\left (i e x \right )^{2} \pi -i \operatorname {csgn}\left (i e x \right )^{3} \pi +2 \ln \left (e \right )+2 \ln \left (x \right )\right )}{2}}}{a n}-\frac {2 b \,{\mathrm e}^{-\frac {i \pi n \,\operatorname {csgn}\left (i e \right ) \operatorname {csgn}\left (i x \right ) \operatorname {csgn}\left (i e x \right )}{2}} {\mathrm e}^{\frac {i \pi n \,\operatorname {csgn}\left (i e \right ) \operatorname {csgn}\left (i e x \right )^{2}}{2}} {\mathrm e}^{\frac {i \pi n \,\operatorname {csgn}\left (i x \right ) \operatorname {csgn}\left (i e x \right )^{2}}{2}} {\mathrm e}^{-\frac {i \pi n \operatorname {csgn}\left (i e x \right )^{3}}{2}} {\mathrm e}^{\frac {i \operatorname {csgn}\left (i e \right ) \operatorname {csgn}\left (i x \right ) \operatorname {csgn}\left (i e x \right ) \pi }{2}} {\mathrm e}^{-\frac {i \operatorname {csgn}\left (i e \right ) \operatorname {csgn}\left (i e x \right )^{2} \pi }{2}} {\mathrm e}^{-\frac {i \operatorname {csgn}\left (i x \right ) \operatorname {csgn}\left (i e x \right )^{2} \pi }{2}} {\mathrm e}^{\frac {i \operatorname {csgn}\left (i e x \right )^{3} \pi }{2}} e^{n} {\mathrm e}^{c} \arctan \left (\frac {2 a \,{\mathrm e}^{2 c +d \,x^{n}}+2 \,{\mathrm e}^{c} b}{2 \sqrt {a^{2} {\mathrm e}^{2 c}-{\mathrm e}^{2 c} b^{2}}}\right )}{a n e d \sqrt {a^{2} {\mathrm e}^{2 c}-{\mathrm e}^{2 c} b^{2}}}\) \(317\)

input
int((e*x)^(-1+n)/(a+b*sech(c+d*x^n)),x,method=_RETURNVERBOSE)
 
output
1/a/n*x*exp(1/2*(-1+n)*(-I*csgn(I*e)*csgn(I*x)*csgn(I*e*x)*Pi+I*csgn(I*e)* 
csgn(I*e*x)^2*Pi+I*csgn(I*x)*csgn(I*e*x)^2*Pi-I*csgn(I*e*x)^3*Pi+2*ln(e)+2 
*ln(x)))-2*b/a/n*exp(-1/2*I*Pi*n*csgn(I*e)*csgn(I*x)*csgn(I*e*x))*exp(1/2* 
I*Pi*n*csgn(I*e)*csgn(I*e*x)^2)*exp(1/2*I*Pi*n*csgn(I*x)*csgn(I*e*x)^2)*ex 
p(-1/2*I*Pi*n*csgn(I*e*x)^3)*exp(1/2*I*Pi*csgn(I*e)*csgn(I*x)*csgn(I*e*x)) 
*exp(-1/2*I*Pi*csgn(I*e)*csgn(I*e*x)^2)*exp(-1/2*I*Pi*csgn(I*x)*csgn(I*e*x 
)^2)*exp(1/2*I*Pi*csgn(I*e*x)^3)*e^n/e*exp(c)/d/(a^2*exp(2*c)-exp(2*c)*b^2 
)^(1/2)*arctan(1/2*(2*a*exp(2*c+d*x^n)+2*exp(c)*b)/(a^2*exp(2*c)-exp(2*c)* 
b^2)^(1/2))
 
3.1.79.5 Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 240 vs. \(2 (78) = 156\).

Time = 0.30 (sec) , antiderivative size = 511, normalized size of antiderivative = 5.87 \[ \int \frac {(e x)^{-1+n}}{a+b \text {sech}\left (c+d x^n\right )} \, dx=\left [\frac {{\left (a^{2} - b^{2}\right )} d \cosh \left ({\left (n - 1\right )} \log \left (e\right )\right ) \cosh \left (n \log \left (x\right )\right ) + {\left (a^{2} - b^{2}\right )} d \cosh \left (n \log \left (x\right )\right ) \sinh \left ({\left (n - 1\right )} \log \left (e\right )\right ) - {\left (\sqrt {-a^{2} + b^{2}} b \cosh \left ({\left (n - 1\right )} \log \left (e\right )\right ) + \sqrt {-a^{2} + b^{2}} b \sinh \left ({\left (n - 1\right )} \log \left (e\right )\right )\right )} \log \left (\frac {a b + {\left (b^{2} + \sqrt {-a^{2} + b^{2}} b\right )} \cosh \left (d \cosh \left (n \log \left (x\right )\right ) + d \sinh \left (n \log \left (x\right )\right ) + c\right ) + {\left (a^{2} - b^{2} - \sqrt {-a^{2} + b^{2}} b\right )} \sinh \left (d \cosh \left (n \log \left (x\right )\right ) + d \sinh \left (n \log \left (x\right )\right ) + c\right ) + \sqrt {-a^{2} + b^{2}} a}{a \cosh \left (d \cosh \left (n \log \left (x\right )\right ) + d \sinh \left (n \log \left (x\right )\right ) + c\right ) + b}\right ) + {\left ({\left (a^{2} - b^{2}\right )} d \cosh \left ({\left (n - 1\right )} \log \left (e\right )\right ) + {\left (a^{2} - b^{2}\right )} d \sinh \left ({\left (n - 1\right )} \log \left (e\right )\right )\right )} \sinh \left (n \log \left (x\right )\right )}{{\left (a^{3} - a b^{2}\right )} d n}, \frac {{\left (a^{2} - b^{2}\right )} d \cosh \left ({\left (n - 1\right )} \log \left (e\right )\right ) \cosh \left (n \log \left (x\right )\right ) + {\left (a^{2} - b^{2}\right )} d \cosh \left (n \log \left (x\right )\right ) \sinh \left ({\left (n - 1\right )} \log \left (e\right )\right ) + 2 \, {\left (\sqrt {a^{2} - b^{2}} b \cosh \left ({\left (n - 1\right )} \log \left (e\right )\right ) + \sqrt {a^{2} - b^{2}} b \sinh \left ({\left (n - 1\right )} \log \left (e\right )\right )\right )} \arctan \left (-\frac {\sqrt {a^{2} - b^{2}} a \cosh \left (d \cosh \left (n \log \left (x\right )\right ) + d \sinh \left (n \log \left (x\right )\right ) + c\right ) + \sqrt {a^{2} - b^{2}} a \sinh \left (d \cosh \left (n \log \left (x\right )\right ) + d \sinh \left (n \log \left (x\right )\right ) + c\right ) + \sqrt {a^{2} - b^{2}} b}{a^{2} - b^{2}}\right ) + {\left ({\left (a^{2} - b^{2}\right )} d \cosh \left ({\left (n - 1\right )} \log \left (e\right )\right ) + {\left (a^{2} - b^{2}\right )} d \sinh \left ({\left (n - 1\right )} \log \left (e\right )\right )\right )} \sinh \left (n \log \left (x\right )\right )}{{\left (a^{3} - a b^{2}\right )} d n}\right ] \]

input
integrate((e*x)^(-1+n)/(a+b*sech(c+d*x^n)),x, algorithm="fricas")
 
output
[((a^2 - b^2)*d*cosh((n - 1)*log(e))*cosh(n*log(x)) + (a^2 - b^2)*d*cosh(n 
*log(x))*sinh((n - 1)*log(e)) - (sqrt(-a^2 + b^2)*b*cosh((n - 1)*log(e)) + 
 sqrt(-a^2 + b^2)*b*sinh((n - 1)*log(e)))*log((a*b + (b^2 + sqrt(-a^2 + b^ 
2)*b)*cosh(d*cosh(n*log(x)) + d*sinh(n*log(x)) + c) + (a^2 - b^2 - sqrt(-a 
^2 + b^2)*b)*sinh(d*cosh(n*log(x)) + d*sinh(n*log(x)) + c) + sqrt(-a^2 + b 
^2)*a)/(a*cosh(d*cosh(n*log(x)) + d*sinh(n*log(x)) + c) + b)) + ((a^2 - b^ 
2)*d*cosh((n - 1)*log(e)) + (a^2 - b^2)*d*sinh((n - 1)*log(e)))*sinh(n*log 
(x)))/((a^3 - a*b^2)*d*n), ((a^2 - b^2)*d*cosh((n - 1)*log(e))*cosh(n*log( 
x)) + (a^2 - b^2)*d*cosh(n*log(x))*sinh((n - 1)*log(e)) + 2*(sqrt(a^2 - b^ 
2)*b*cosh((n - 1)*log(e)) + sqrt(a^2 - b^2)*b*sinh((n - 1)*log(e)))*arctan 
(-(sqrt(a^2 - b^2)*a*cosh(d*cosh(n*log(x)) + d*sinh(n*log(x)) + c) + sqrt( 
a^2 - b^2)*a*sinh(d*cosh(n*log(x)) + d*sinh(n*log(x)) + c) + sqrt(a^2 - b^ 
2)*b)/(a^2 - b^2)) + ((a^2 - b^2)*d*cosh((n - 1)*log(e)) + (a^2 - b^2)*d*s 
inh((n - 1)*log(e)))*sinh(n*log(x)))/((a^3 - a*b^2)*d*n)]
 
3.1.79.6 Sympy [F]

\[ \int \frac {(e x)^{-1+n}}{a+b \text {sech}\left (c+d x^n\right )} \, dx=\int \frac {\left (e x\right )^{n - 1}}{a + b \operatorname {sech}{\left (c + d x^{n} \right )}}\, dx \]

input
integrate((e*x)**(-1+n)/(a+b*sech(c+d*x**n)),x)
 
output
Integral((e*x)**(n - 1)/(a + b*sech(c + d*x**n)), x)
 
3.1.79.7 Maxima [F]

\[ \int \frac {(e x)^{-1+n}}{a+b \text {sech}\left (c+d x^n\right )} \, dx=\int { \frac {\left (e x\right )^{n - 1}}{b \operatorname {sech}\left (d x^{n} + c\right ) + a} \,d x } \]

input
integrate((e*x)^(-1+n)/(a+b*sech(c+d*x^n)),x, algorithm="maxima")
 
output
-2*b*e^n*integrate(e^(d*x^n + n*log(x) + c)/(a^2*e*x*e^(2*d*x^n + 2*c) + 2 
*a*b*e*x*e^(d*x^n + c) + a^2*e*x), x) + e^(n - 1)*x^n/(a*n)
 
3.1.79.8 Giac [F]

\[ \int \frac {(e x)^{-1+n}}{a+b \text {sech}\left (c+d x^n\right )} \, dx=\int { \frac {\left (e x\right )^{n - 1}}{b \operatorname {sech}\left (d x^{n} + c\right ) + a} \,d x } \]

input
integrate((e*x)^(-1+n)/(a+b*sech(c+d*x^n)),x, algorithm="giac")
 
output
integrate((e*x)^(n - 1)/(b*sech(d*x^n + c) + a), x)
 
3.1.79.9 Mupad [B] (verification not implemented)

Time = 2.68 (sec) , antiderivative size = 409, normalized size of antiderivative = 4.70 \[ \int \frac {(e x)^{-1+n}}{a+b \text {sech}\left (c+d x^n\right )} \, dx=\frac {x\,{\left (e\,x\right )}^{n-1}}{a\,n}-\frac {\left (2\,\mathrm {atan}\left (\frac {a^2\,{\mathrm {e}}^{d\,x^n}\,{\mathrm {e}}^c\,\left (\frac {2\,b\,x\,{\left (e\,x\right )}^{n-1}}{a^4\,d\,n\,x^n\,\sqrt {b^2\,x^2\,{\left (e\,x\right )}^{2\,n-2}}}+\frac {2\,b\,d\,n\,x^n\,{\left (e\,x\right )}^{1-n}\,\sqrt {b^2\,x^2\,{\left (e\,x\right )}^{2\,n-2}}}{a^2\,x\,\sqrt {a^4\,d^2\,n^2\,x^{2\,n}-a^2\,b^2\,d^2\,n^2\,x^{2\,n}}\,\sqrt {a^2\,d^2\,n^2\,x^{2\,n}\,\left (a^2-b^2\right )}}\right )\,\sqrt {a^4\,d^2\,n^2\,x^{2\,n}-a^2\,b^2\,d^2\,n^2\,x^{2\,n}}}{2}+\frac {a\,d\,n\,x^n\,{\left (e\,x\right )}^{1-n}\,\sqrt {b^2\,x^2\,{\left (e\,x\right )}^{2\,n-2}}}{x\,\sqrt {a^2\,d^2\,n^2\,x^{2\,n}\,\left (a^2-b^2\right )}}\right )+2\,\mathrm {atan}\left (\frac {x\,{\left (e\,x\right )}^{n-1}\,\sqrt {a^2\,d^2\,n^2\,x^{2\,n}\,\left (a^2-b^2\right )}}{a\,d\,n\,x^n\,\sqrt {b^2\,x^2\,{\left (e\,x\right )}^{2\,n-2}}}\right )\right )\,\sqrt {b^2\,x^2\,{\left (e\,x\right )}^{2\,n-2}}}{\sqrt {a^4\,d^2\,n^2\,x^{2\,n}-a^2\,b^2\,d^2\,n^2\,x^{2\,n}}} \]

input
int((e*x)^(n - 1)/(a + b/cosh(c + d*x^n)),x)
 
output
(x*(e*x)^(n - 1))/(a*n) - ((2*atan((a^2*exp(d*x^n)*exp(c)*((2*b*x*(e*x)^(n 
 - 1))/(a^4*d*n*x^n*(b^2*x^2*(e*x)^(2*n - 2))^(1/2)) + (2*b*d*n*x^n*(e*x)^ 
(1 - n)*(b^2*x^2*(e*x)^(2*n - 2))^(1/2))/(a^2*x*(a^4*d^2*n^2*x^(2*n) - a^2 
*b^2*d^2*n^2*x^(2*n))^(1/2)*(a^2*d^2*n^2*x^(2*n)*(a^2 - b^2))^(1/2)))*(a^4 
*d^2*n^2*x^(2*n) - a^2*b^2*d^2*n^2*x^(2*n))^(1/2))/2 + (a*d*n*x^n*(e*x)^(1 
 - n)*(b^2*x^2*(e*x)^(2*n - 2))^(1/2))/(x*(a^2*d^2*n^2*x^(2*n)*(a^2 - b^2) 
)^(1/2))) + 2*atan((x*(e*x)^(n - 1)*(a^2*d^2*n^2*x^(2*n)*(a^2 - b^2))^(1/2 
))/(a*d*n*x^n*(b^2*x^2*(e*x)^(2*n - 2))^(1/2))))*(b^2*x^2*(e*x)^(2*n - 2)) 
^(1/2))/(a^4*d^2*n^2*x^(2*n) - a^2*b^2*d^2*n^2*x^(2*n))^(1/2)